Apple, the Apple logo, AppleScript, Bento, Macintosh, QuickTime, and OpenDoc are
registered trademarks of Apple Computer, Inc.
Finder, Mac, and QuickDraw are trademarks of Apple Computer, Inc.
SOM, SOMObjects, and System Object Model are licensed trademarks of IBM Corporation.
Introduction
All OpenDoc parts are responsible for notifying their containing part when their content changes. This notification enables a containing part to update links that include embedded data. This document summarizes the responsibilities of a part that does not support linking. Developers of parts supporting linking are referred to the Linking recipes for more information.
Calling ODFrame::ContentUpdated
Parts call the ContentUpdated method of their display frames to notify their containing parts of changes to their content. When a change originates in a part, for example, in response to keyboard input,, the part should call the ContentUpdated method of each display frame affected by the change, passing it an update ID for the change. For changes originating within a part, this ID should be obtained by calling the UniqueUpdateID method of the session object. For example:
It is not necessary to call ContentUpdated on every individual change, for example, on every keystroke. A part can “batch” individual changes into one call to ContentUpdated, by waiting for a reasonable pause in changes or until the part loses the selection focus. Be sure to use call UniqueUpdateID each time ContentUpdated is called, however.
Implementing EmbeddedFrameUpdated
A part that does not support linking does not need to take any action in its EmbeddedFrameUpdated method. In particular, it does not need to pass the notification to its containing part.